//
//  UIView+Layout.m
//  gosh
//
//  Created by 许小军 on 16/9/22.
//  Copyright © 2016年 wyzc. All rights reserved.
//

#import "UIView+Layout.h"

@implementation UIView (Layout)

-(void)setCur_x:(CGFloat)cur_x
{
    CGRect rect=self.frame;
    rect.origin.x=cur_x;
    self.frame=rect;
}
-(CGFloat)cur_x
{
    return self.frame.origin.x;
}


-(void)setCur_y:(CGFloat)cur_y
{
    CGRect rect=self.frame;
    rect.origin.y=cur_y;
    self.frame=rect;
}
-(CGFloat)cur_y
{
    return self.frame.origin.y;
}


-(void)setCur_w:(CGFloat)cur_w
{
    CGRect rect=self.frame;
    rect.size.width=cur_w;
    self.frame=rect;
}
-(CGFloat)cur_w
{
    return self.frame.size.width;
}

-(void)setCur_h:(CGFloat)cur_h
{
    CGRect rect=self.frame;
    rect.size.height=cur_h;
    self.frame=rect;
}
-(CGFloat)cur_h
{
    return self.frame.size.height;
}


-(void)setCur_center_x:(CGFloat)cur_center_x
{
    CGPoint center=self.center;
    center.x=cur_center_x;
    self.center=center;
}
-(CGFloat)cur_center_x
{
    return self.center.x;
}

-(void)setCur_center_y:(CGFloat)cur_center_y
{
    CGPoint center=self.center;
    center.y=cur_center_y;
    self.center=center;
}
-(CGFloat)cur_center_y
{
    return self.center.y;
}



-(CGFloat)cur_x_w
{
    return self.frame.origin.x+self.frame.size.width;
}
-(CGFloat)cur_y_h
{
    return self.frame.origin.y+self.frame.size.height;
}

@end















